#pragma once
#include "MyGameWindow.h"
#include "MyGameButton.h"

enum ScrollBarMiddleBtnMouseState
{
	MBMS_Normal = 0,
	MBMS_MouseOn,
	MBMS_MouseDown,
};

class CMyGameScrollBar : public CMyGameWindow
{
protected:
	CMyGameButton m_btnUp;
	CMyGameButton m_btnDown;

	CSprite m_sprBack;
	CSprite m_sprMiddle;
	RECT m_rMiddleRect;
	ScrollBarMiddleBtnMouseState m_MouseState;

public:
	CMyGameScrollBar(void);
	~CMyGameScrollBar(void);

	BOOL OnCreate();
	void LoadRes(LPCSTR szUpBtnFileName,LPCSTR szDownBtnFileName,LPCSTR szMiddleBtnFileName,LPCSTR szBackFileName);
	BOOL OnChildMsg(ChildWndMsgType MsgType,string strChildWndName,void* pUserData);
	void OnLBtnDown(int x,int y);
	void OnLBntUp(int x,int y);
	void OnMouseMove(int x,int y);
};
